package cn.edu.sjtu.se.dslab.component.design.generate.element;

import java.util.Map;

public class StaticString extends PageElement {

	public static final String X_COORDINATE = "x_coordinate";
	public static final String Y_COORDINATE = "y_coordinate";
	public static final String STRING_CONTENT = "string_content";

	private String stringContent;
	private int xCoordinate;
	private int yCoordinate;

	public StaticString(Map<String, String> elementMap) {
		super.setElementName(elementMap.get(ELEMENT_NAME));
		super.setElementType(ElementType.valueOf(elementMap.get(ELEMENT_TYPE).toUpperCase()));
		stringContent = elementMap.get(STRING_CONTENT);
		xCoordinate = Integer.parseInt(elementMap.get(X_COORDINATE));
		yCoordinate = Integer.parseInt(elementMap.get(Y_COORDINATE));
	}

	public String getStringContent() {
		return stringContent;
	}

	public void setStringContent(String stringContent) {
		this.stringContent = stringContent;
	}

	public int getxCoordinate() {
		return xCoordinate;
	}

	public void setxCoordinate(int xCoordinate) {
		this.xCoordinate = xCoordinate;
	}

	public int getyCoordinate() {
		return yCoordinate;
	}

	public void setyCoordinate(int yCoordinate) {
		this.yCoordinate = yCoordinate;
	}

}
